package mapping

import (
	"maya-service/model"
	"maya-service/model/entity"
)

// DictionaryTypesEntityToDto entity data transfer
func DictionaryTypesEntityToDto(dictionaryTypes []*entity.DictionaryType) []*model.DictionaryTypeInfo {
	out := make([]*model.DictionaryTypeInfo, 0, len(dictionaryTypes))
	for _, c := range dictionaryTypes {
		out = append(out, DictionaryTypeEntityToDto(c))
	}
	return out
}

// DictionaryTypeEntityToDto entity data transfer
func DictionaryTypeEntityToDto(e *entity.DictionaryType) *model.DictionaryTypeInfo {
	return &model.DictionaryTypeInfo{

		Id: e.Id,

		Code: e.Code,

		Name: e.Name,

		Status: e.Status,

		Description: e.Description,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
